Reference
  Area\Util.txt
  Util\Audio.txt
  Util\Party.txt
  Area\Service.txt
  Util\CommonDialog.txt
End Reference

Procedure Main(startAt)

  Dim ac = Nothing

  RegisterCommonEventHandlers()

  SetZoneOfTown(64, 64, 7, 22, 52, 62, ExitArea_Enter)

  ac = AddActor_MTStopped("EqShopper", 17, 44, 0, [A_Man], ActorMotion.Down, Nothing)
  ac = AddStaticActor("EqShopperEve", 17, 45, 10, [A_Null], EqShopperEve_Contact)

  ac = AddActor_MTStopped("MgShopper", 19, 44, 0, [A_OldMan], ActorMotion.Down, Nothing)
  ac = AddStaticActor("MgShopperEve", 19, 45, 10, [A_Null], MgShopperEve_Contact)

  ac = AddActor_MTStopped("GdShopper", 12, 33, 0, [A_Woman], ActorMotion.Down, Nothing)
  ac = AddStaticActor("GdShopperEve", 12, 34, 10, [A_Null], GdShopperEve_Contact)

  ac = AddActor_MTStopped("InnFront", 10, 33, 0, [A_Man], ActorMotion.Down, Nothing)
  ac = AddStaticActor("InnFrontEve", 10, 34, 10, [A_Null], InnFrontEve_Contact)
  
  ac = AddActor_MTZonedRandom("Towner1", 47, 45, 0, _
    44, 43, 0, 50, 47, 0, [A_Man], Towner1_Contact)
    
  ac = AddActor_MTZonedRandom("Towner2", 47, 57, 0, _
    44, 55, 0, 50, 59, 0, [A_Soldier], Towner2_Contact)
    
  DoInsideWarp(startAt, SetEntranceEx({29, 39, 0}, {29, 62, 0}, {7, 40, 0}, {52, 40, 0}), False)
  
  ChangeBGM(Music.Town)
  PutAreaNameLabel()

  NotifyEntered()
  Idle(ProcessInput)
  NotifyExiting()

End Procedure

Procedure ExitArea_Enter()
  BeginOutsideWarp([Field], GetAreaObject().Tag)
End Procedure

Procedure EqShopperEve_Contact()
  DoShop({[Katana], [SonicBoom], [TitanArmor], [ZirconArmor], [TitanShield], [ZirconShield], [TitanHelmet], [ZirconHelmet]})
End Procedure

Procedure MgShopperEve_Contact()
  DoMagicShop({[Heal3], [Fire3], [IntUp], [IntDown], [Berserk], [FireDPUp], [HealAll2], [Cold3], [Elec3], [Charm], [ElecDPUp], [Revive2]})
End Procedure

Procedure GdShopperEve_Contact()
  DoShop({[Heal_T1], [Heal_T2], [CureAll_T], [Revive_T]})
End Procedure

Procedure InnFrontEve_Contact()
  DoInn(270)
End Procedure

Procedure Towner1_Contact()
  Dim p_name = [TheHero].Name + "："
  Dim q_name = "村人："
  If TestFlag("Yomsikl_1") Then
    DoMsg(q_name, "俺から聞いたって事は秘密にしておけよ")
  Else
    DoMsg(q_name, "あ！")
    DoMsg(p_name, "どうしました？")
    DoMsg(q_name, "その髪　その眼", _
      "おまえまさか……テレーゼの？")
    DoMsg(p_name, "テレーゼは僕の母ですが……")
    DoMsg(q_name, "父親はギュンターか？")
    DoMsg(p_name, "父と母をご存知なのですか？")
    DoMsg(q_name, "ご存知も何も　テレーゼはこの村から……", _
      "もしかして　何も聞いていないのか？")
    DoMsg(p_name, "………………？")
    DoMsg(q_name, "そうなのか　まあ言いたくないかもなあ", _
      "やめとこう　聞かなかったことにしてくれ")
    DoMsg(p_name, "いや　話してください", _
      "母は前に　この村にいたんですね？")
    DoMsg(q_name, "わかった　じゃあ話そう")
    Sleep(1000)
    DoMsg(q_name, "テレーゼはこの村の魔道士の一人娘だった", _
      "で　ある男と結婚することになっていたんだ")
    DoMsg(p_name, "父ではないのですか？")
    DoMsg(q_name, "いや　あいつの母親が決めた相手だ", _
      "母親が決めるのが　決まりだったらしい")
    DoMsg(q_name, "だが　テレーゼの心の中には", _
      "すでにギュンターしかいなかったんだ", _
      "それである日　テレーゼは姿を消してしまった", _
      "おそらくギュンターの元に行ったのだろうと", _
      "思ったがそのギュンターも行方知れず……")
    DoMsg(q_name, "それから間もなくあいつの両親も亡くなり", _
      "魔道士の家系は途絶えてしまった", _
      "というわけなんだ")
    DoMsg(p_name, "そんなことが……")
    DoMsg(q_name, "二人は今どこにいるんだい？")
    DoMsg(p_name, "ラブロです　クレノサの")
    DoMsg(q_name, "そんな遠くに……見つからないわけだ", _
      "まあ　元気にやってるならいいか", _
      "俺から聞いたって事は秘密にしておけよ")
    SetFlag("Yomsikl_1")
  End If
End Procedure

Procedure Towner2_Contact()
  DoMsg("ずっと東にセレーベという町がある")
End Procedure
